import Vue from 'vue';
import App from './App.vue'
import router from './router'
import "./styles/global.less";
import store from './store';
store.dispatch("setting/fetchSetting");  //全局设置

//全局方法
import {showMessage,asyncShowMessage} from "@/utils";
Vue.prototype.$showMessage = showMessage;
Vue.prototype.$asyncShowMessage = asyncShowMessage;

//全局指令
import Loading from './directives/Loading';
import Lazy from './directives/Lazy';
Vue.directive('loading', Loading);
Vue.directive('lazy', Lazy);


//模拟数据必须在请求接口前面
import "./mock";

//事件总线
import "./eventBus.js";


const app = new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
